/*
 * create:2016年4月17日 下午4:53:50
 * author:wangds  
 */
package com.cxkj.shop.biz;

import java.util.Collection;

import com.cxkj.shop.form.DefaultDelivery;
import com.cxkj.shop.form.Delivery;
import com.cxkj.shop.model.order.Order;
import com.cxkj.shop.proc.order.SelOrderListProc;
import com.cxkj.shop.utils.BusinessUtils;

import net.wangds.comp.business.http.AbstractHttpInteractionBusiness;

/**
 * .
 * @author wangds
 *
 */
public class LoadOrdersBusiness  extends AbstractHttpInteractionBusiness<Object, Delivery>{

  private SelOrderListProc proc = null;
  
  /**
   * The getter method of the property proc.
   * @author wangds 2016年4月17日 下午4:55:19.
   * @return the proc.
   */
  public SelOrderListProc getProc() {
    return proc;
  }



  /**
   * The setter method of the property proc.
   * @param theproc the proc to set
   * @author wangds 2016年4月17日 下午4:55:19.
   */
  public void setProc(SelOrderListProc proc) {
    this.proc = proc;
  }



  /*
   * @see net.wangds.common.processor.Processor#process()
   * @author wangds 2016年4月17日 下午4:54:16.
   */
  @Override
  public void process() throws Exception {
    DefaultDelivery<Collection<Order>> res = new DefaultDelivery<Collection<Order>>();
    String openId = BusinessUtils.getOpenIdSession(BusinessUtils.getHttpSessionFromHttpBusiness(this));
    //if(StringUtils.isNotBlank(openId)){
      SelOrderListProc proc = this.getProc();
      proc.setOpenId(openId);
      proc.process();
      res.setData(proc.getResult());
      res.setSuccess(true);
    //}
    this.setOutput(res);
  }

}
